package com.example.orderstoremes.core.config;


import com.example.orderstoremes.module.system.entity.SysUser;

/**
 * @describe: TODO
 * @className: ThreadLocalCatch
 * @author: banlingchao
 **/
public class GlobalUserMsg {

    private GlobalUserMsg() {
    }

    private static final ThreadLocal<SysUser> LOCAL = new ThreadLocal<>();

    public static void put(SysUser sysUser) {
        LOCAL.set(sysUser);
    }

    public static SysUser get() {
        return LOCAL.get();
    }

    public static void remove() {
        LOCAL.remove();
    }

}
